# Use the official Python base image
FROM python:3.11-slim

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file to the container
COPY requirements.txt .

# Install the PostgreSQL development libraries
RUN apt update && apt install -y libpq-dev gcc

# Install the app dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the app source code to the container
COPY . .

# Start the app
CMD ["python", "main.py"]

